package com.ruoyi.business.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.ruoyi.business.VO.MonthVO;
import com.ruoyi.business.VO.RankVO;
import com.ruoyi.business.VO.StatisticsVO;
import com.ruoyi.business.domain.BuEarnings;
import org.apache.ibatis.annotations.Param;

/**
 * 收益Mapper接口
 *
 * @author ruoyi
 * @date 2024-09-12
 */
public interface BuEarningsMapper
{
    /**
     * 查询收益
     *
     * @param id 收益主键
     * @return 收益
     */
    public BuEarnings selectBuEarningsById(Long id);

    /**
     * 查询收益列表
     *
     * @param buEarnings 收益
     * @return 收益集合
     */
    public List<BuEarnings> selectBuEarningsList(BuEarnings buEarnings);

    /**
     * 新增收益
     *
     * @param buEarnings 收益
     * @return 结果
     */
    public int insertBuEarnings(BuEarnings buEarnings);

    /**
     * 修改收益
     *
     * @param buEarnings 收益
     * @return 结果
     */
    public int updateBuEarnings(BuEarnings buEarnings);

    /**
     * 删除收益
     *
     * @param id 收益主键
     * @return 结果
     */
    public int deleteBuEarningsById(Long id);

    /**
     * 批量删除收益
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBuEarningsByIds(Long[] ids);

    public StatisticsVO selectSum();
    public BigDecimal month(@Param("month") Date month);

    List<RankVO> rank(@Param("month") Date month);
}
